Calculate Work For Reversible And Irreversible Expansion/Compression